import Rentmanagement from '../rentmanagement.vue';
import Owners from '../owners.vue';
import Salesman from '../salesman.vue';
import Renters from '../renters.vue';
import CarModel from '../carmodel.vue';
import Car from '../car.vue';
import Menuhome from '../menuhome.vue';
const Home = () => import('../home/home.vue');

const adminRoutes = [
  {
    path: '/admin',
    name: 'AdminHome', 
    component: Home,
    redirect: '/admin/menuhome', // 默认重定向到 menuhome
    children: [
      { path: 'menuhome', name: 'Menuhome', component: Menuhome },
      { path: 'rentmanagement', component: Rentmanagement },
      { path: 'owners', component: Owners }, 
      { path: 'salesman', component: Salesman },
      { path: 'renters', component: Renters },
      { path: 'carmodel', component: CarModel },
      { path: 'car', component: Car }
    ]
  },
];

export default adminRoutes;